
import 'package:flutter/material.dart';

class ScoreCardPlane extends StatefulWidget {
  @override
  _ScoreCardPlaneState createState() => _ScoreCardPlaneState();
}

class _ScoreCardPlaneState extends State<ScoreCardPlane> {
  int _score1 = 0;
  int _score2 = 0;

  final TextStyle _textStyle = TextStyle(fontSize: 80, fontStyle: FontStyle.normal, color: Colors.red);

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceEvenly,
        children: <Widget>[
          new GestureDetector(
            onTap: () {
              setState(() {
                ++_score1;
              });
            },
            child: Card(
              color: Colors.amber[100],
              elevation: 15,
              child: new Container(
                constraints: BoxConstraints.tightFor(width: 150, height: 150),
                alignment: Alignment.center,
                child: new Text(_score1.toString(), style: _textStyle,),
              ),
            )
          ),
          new GestureDetector(
            onTap: () {
              setState(() {
                ++_score2;
              });
            },
            child: Card(
              color: Colors.amber[100],
              elevation: 15,
              child: new Container(
                constraints: BoxConstraints.tightFor(width: 150, height: 150),
                alignment: Alignment.center,
                child: new Text(_score2.toString(), style: _textStyle,),
              ),
            )
          )
        ],
      ),
    );
  }
}